import request from '../lib/request.js'

export function index(params){
	return request({url:'/api/admin/product/index',method:'get',params:params});
}


export function create(data){
	return request({url:'/api/admin/product/create',method:'post',data:data});
}

export function updateProduct(data) {
	return request({url:'/api/admin/product/update',method:'post',data:data});
}

export function del(data) {
	return request({url:'/api/admin/product/del',method:'post',data:data});
}
export function getInfo(params) {
	return request({url:'/api/admin/product/info',method:'get',params:params});
}

export function setUp(data)
{
	return request({url:'/api/admin/product/setup',method:'post',data:data});
}
export function setDown(data){
	return request({url:'/api/admin/product/setdown',method:'post',data:data});
}
export function setRecommend(data){
	return request({url:'/api/admin/product/recommend',method:'post',data:data});
}
export function setUnRecommend(data){
	return request({url:'/api/admin/product/unrecommend',method:'post',data:data});
}
export function getSkus(params) {
	return request({url:'/api/admin/product/sku',method:'get',params:params});
}

export function createSku(data){
	return request({url:'/api/admin/product/sku/create',method:'post',data:data});
}
